<?php
/**
 * @revision      $Id: loader.php 7 2011-08-20 10:33:23Z agbiggora@gmail.com $   
 * @created       Apr 22, 2011
 * @category      MongoWeb
 * @package       AG CMS
 * @version       version
 * @copyright     Copyright Alexey Gordeyev IK (c) 2009-2011 - All rights reserved.
 * @license       GNU Lesser GPL
 * @author        Alexey Gordeyev IK <aleksej@gordejev.lv>
 * @link          http://www.gordejev.lv/
 * @link          http://www.agjoomla.com/
 * @link          http://code.google.com/p/ag-cms/
 */

// No direct access
defined('_AGEXEC') or die;

/**
 * AG CMS Class Loader
 * @since 1.0.0
 */
Class Loader
{
    public static function registerAutoload()
    {
        return spl_autoload_register(array(__CLASS__, 'includeClass'));
    }
    
    public static function unregisterAutoload()
    {
        return spl_autoload_unregister(array(__CLASS__, 'includeClass'));
    }
    
    public static function includeClass($class)
    {
        require(PATH . '/' . strtr($class, '_\\', '//') . '.php');
    } 
}


?>